import { createRouter, createWebHashHistory } from 'vue-router'
import layout from '../layout/index.vue';
const routes = [
  {
    path: '/',
    name: 'home',
    component: layout,
    redirect: '/home',
    children: [{
        path: 'home',
        name: 'Home',
        component: () => import('../views/home.vue')
    }]
  },
  {
    path: '/home',
    name: 'Home',
    component: layout,
    redirect: '/one',
    children: [{
        path: 'one',
        name: 'One',
        component: () => import('../views/one.vue')
    }]
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login.vue')
  }
]
const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
